import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { BusiProvider } from '../../providers/busi/busi';

/**
 * Generated class for the MyordersPage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */

@IonicPage()
@Component({
  selector: 'page-myorders',
  templateUrl: 'myorders.html',
})
export class MyordersPage {
  orderlist:any;
  constructor(public navCtrl: NavController, public navParams: NavParams,public busi:BusiProvider) {
    this.busi.getMyOrders().subscribe(
      data=>{
        this.orderlist = data.myorders;
      },
      err=>{

      }
    )
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad MyordersPage');
  }

  productdetail(prodid){
    this.navCtrl.push("ProductdetailPage",{prodid:prodid});
  }

}
